package com.liuyanzhao.blog.entity.custom;

import com.liuyanzhao.blog.entity.Tag;

/**
 * 文章标签的信息的扩展
 */
public class TagCustom extends Tag {
	//标签对应的文章数目
	private Integer articleCount;

	public Integer getArticleCount() {
		return articleCount;
	}

	public void setArticleCount(Integer articleCount) {
		this.articleCount = articleCount;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + ((articleCount == null) ? 0 : articleCount.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		TagCustom other = (TagCustom) obj;
		if (articleCount == null) {
			if (other.articleCount != null)
				return false;
		} else if (!articleCount.equals(other.articleCount))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "TagCustom [articleCount=" + articleCount + "]";
	}
	
	
}
